//
//  ViewControllerOfChatList.m
//  RunningMan
//
//  Created by 宗大丞 on 16/5/23.
//  Copyright © 2016年 JohnnyB. All rights reserved.
//

#import "ViewControllerOfChatList.h"
#import "ViewControllerOfConversation.h"
#import "EMSDK.h"

@interface ViewControllerOfChatList ()

@end

@implementation ViewControllerOfChatList

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self configure];

}

- (void)configure {
    
    //无网络时显示.
    self.showConnectingStatusOnNavigatorBar = YES;
    
    //设置头像为圆形.
    [self setConversationAvatarStyle:RC_USER_AVATAR_CYCLE];
    
    //设置需要显示哪些类型的对话.
    [self setDisplayConversationTypes:@[@(ConversationType_PRIVATE), @(ConversationType_DISCUSSION), @(ConversationType_CHATROOM), @(ConversationType_GROUP), @(ConversationType_APPSERVICE), @(ConversationType_SYSTEM)]];
}

- (void)onSelectedTableRow:(RCConversationModelType)conversationModelType conversationModel:(RCConversationModel *)model atIndexPath:(NSIndexPath *)indexPath {
    
    ViewControllerOfConversation *chatVC = [[ViewControllerOfConversation alloc] initWithConversationType:ConversationType_PRIVATE targetId:model.targetId];
    chatVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:chatVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
